# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=libdeflate
pkgver=1.10
pkgrel=0
pkgdesc="Library for fast, whole-buffer DEFLATE-based compression and decompression"
url="https://github.com/ebiggers/libdeflate"
arch="all"
license="MIT"
checkdepends="
	zlib-dev
	"
subpackages="
	$pkgname-dev
	$pkgname-utils
	"
source="
	libdeflate-$pkgver.tar.gz::https://github.com/ebiggers/libdeflate/archive/v$pkgver.tar.gz
	"

build() {
	make PREFIX=/usr USE_SHARED_LIB=1 gunzip
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr USE_SHARED_LIB=1 install
	rm "$pkgdir"/usr/lib/libdeflate.a
}

utils() {
	pkgdesc="Command line utilities for the DEFLATE library"
	amove /usr/bin
}
sha512sums="
2b59cc170c7fb3bb13bd3c6853070ea24fb9e6844dde4d08e43a8a5f8745ecbf844952390ff758070c6fc4f17d9eec8c4d2a729922bf84e2eaa9e74f1424e241  libdeflate-1.10.tar.gz
"
